package com.sinothk.client.file.controller;


import com.sinothk.client.file.model.FileBean;
import com.sinothk.server.support.entity.ResultData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.ArrayList;

@Api(tags = "文件系统(Windows)")
@RestController
@RequestMapping("/file/win")
public class FileWinController implements IFileController {

    @ApiOperation(value = "上传_文件列表", notes = "上传文件列表")
    @PostMapping("/add")
    @Override
    public ResultData<ArrayList<FileBean>> add(
            @ApiParam(value = "验证Token", type = "header", required = true) @RequestHeader(value = "token") String token,
            @ApiParam(value = "文件列表", required = true) @RequestParam("files") MultipartFile[] fileList) {
        return new ResultData<ArrayList<FileBean>>().getSuccess(new ArrayList<FileBean>());
    }

    @ApiOperation(value = "获取文件信息", notes = "获取文件信息")
    @GetMapping("/getInfo")
    public FileBean getInfo() {
        FileBean user = new FileBean();
        user.setFileName("sinothk.doc");
        return user;
    }
}